Gmoccapy: make Tool Table exit more verbose#3792
Gmoccapy: make Tool Table exit more verbose#3792zz912 wants to merge 1 commit intoLinuxCNC:masterfrom
Conversation
|
I have no problem with this addition. |
|
Please resolve the review if the changes are OK. Then we can merge it. |
|
IMO this PR needs a proper commit message, I have no idea what a "Tool Table exit" is and why / how it affects (only?) gmoccapy. |
This PR adds another popup message (4.) for situations when the operator selects offset == 0, or previously was offset == 0 and the operator changed the offset != 0. |
I wonder what the rationale is justifying this behaviour or if it is simply a bug in the interpreter. It certainly isn't documented here https://linuxcnc.org/docs/devel/html/gcode/g-code.html#gcode:g43 Playing around with this a bit in qtvcp and axis, it seems there are bugs like this in other GUIs too. Maybe the proper place to fix this is somewhere else? |
That's an interesting question. I just took it for properties. It didn't occur to me that it could be a bug.
If this is a bug, it should be fixed elsewhere. But that's beyond my capabilities. |
Looking at this a bit more closely makes me think that this is actually a phantom problem as I'm not sure there IS an internal state like 'activated' / 'deactivated' tool offset as such. All we seem to do with G43/G49 is change the values of the internal tool length compensation. For G49 they are all set to zero. linuxcnc/src/emc/rs274ngc/interp_convert.cc Line 6183 in f82c475 The displayed 'G43' / 'G49' in the 'active gcodes' only reflects whether the current internal tool length values are all zero ('G49') or not ('G43') linuxcnc/src/emc/rs274ngc/interp_write.cc Line 110 in f82c475 So 'activating G43 with zero offsets' does not actually 'deactivate' tool compensation it only makes 'G49' appear in the active gcodes list because all internal tool offset values are zero. |
|
Thank you for looking into this. I agree that for LCNC developers this sentence "Activating G43 with zero offsets deactivates tool compensation." is inaccurate. However, for a CNC machine operator it is correct. For LCNC developers, the sentence should be "Activating G43 with zero offsets makes 'G49' appear in the active gcodes list." However, a CNC machine operator will not even know what a "gcode list" is. We are currently in a situation where LCNC developers should decide whether: If this is correct behavior, it should be added to the documentation and this PR should be merged. I consider myself an LCNC tester, not a developer. Both options are acceptable to me. BTW: linuxcnc/src/emc/rs274ngc/interp_write.cc Lines 110 to 113 in f82c475 These lines prove that LCNC really works with zero values and not with 10E-9. |
What made you think that it used 10E-9 for tool offsets? |
|
I wonder what dangerous consequences that could have? If tool offsets are 0, then there are no offsets, and it doesn't matter if machine displays "G43" or "G49". |
This situation can occur when you use a CNC machine as a conventional machine. It is the case when you use manual mode for machining as well. You have for example:
Another situation:
I think this is a problem mainly for Gmoccapy users who are spoiled by automatic G43. |
|
Thanks for the explanation, I understand how that can be surprising and annoying. Still not sure if there is something in the interpreter that should be changed, allowing an active G43 in case tool offsets are zero would be an easy change. |
I would be in favor of changing it. IMO it IS a bit problematic to present G43, G43.1, G49 as being modal and then silently change it to G49 when the tool offset values happen to be all zero. This is indeed rather unexpected behavior. |

LinuxCNC core behavior:
Activating G43 with zero offsets deactivates tool compensation.
In this situation, G43 behaves like G49.
If the CNC operator is not aware of this, it can have dangerous consequences.
@hansu was not aware of this in the past. See:
#3706 (comment)
I struggled with this as well.
Therefore, I made exiting the Tool Table in Gmoccapy more verbose and added the option to activate G43 when the active offset changes from zero to non-zero.
I would like to ask @Sigma1912 for their opinion on whether this is OK.